export function blockStock(data) {
    const { hotspotName, blockCode, stock, articleType } = data;
    window.prompt(
      "",
      `up://["user.info",${Date.now()},{"type":"决策伏击","params":{"articleType":${articleType}},"data":{"hotspotName":"${hotspotName}","blockCode":"${blockCode}","stock":${stock}}}]`
    );
  }
  
  //跳转实时行情
  export function stockMarker(code, type, block) {
    console.log(code);
    const setcode = code.match(/(\w)+$/g)[0] == "SZ" ? "0" : "1";
    
    console.log(setcode,'setcode')
    type = type == undefined ? "" : type;
    if (block) {
      code = code.match(/\d{6}$/)[0];
    } else {
      code = code.match(/\d{6}/)[0];
    }
    window.prompt(
      "",
      `up://["open.stock",${Date.now()},{"setcode":"${
        block ? block : setcode
      }","code":"${code}","type":"${type}"}]`
    );
  }
  
  